package com.cpecc.model.system;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.cpecc.liucheng.model.HuanJie;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "sys_YouJian")
public class YouJian implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -7570101305702828933L;

	@Id 
	@GeneratedValue(generator = "persistenceGenerator")
	@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
	private int id;
	
	@ManyToOne
	@JoinColumn(name="huanJie_ID")
	private HuanJie huanJie;
	
	@Column(length = 32)
	private String title;
	
	@Column(length = 1000)
	private String content;
	
	@Column(length = 1)
	private int state;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public HuanJie getHuanJie() {
		return huanJie;
	}

	public void setHuanJie(HuanJie huanJie) {
		this.huanJie = huanJie;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public YouJian(int id, HuanJie huanJie, String title, String content,
			int state) {
		super();
		this.id = id;
		this.huanJie = huanJie;
		this.title = title;
		this.content = content;
		this.state = state;
	}

	public YouJian() {
		super();
	}
}
